<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions'%>

<div>
	<form:form action="farm?action=save&item=animal&kraalid=${kraal.id }&qpage=${qpage }&animalid=${animal.id}" commandName="animal" id="animalForm"  enctype="multipart/form-data">
		<input type="hidden" id="id" value="${kraal.id }">
		<input type="hidden" id="qpage" value="${qpage}">
		<input type="hidden" id="animalid" value="${animal.id}">
		<div class="splitcontentleft">
			<div class="box tabular">
				<h4>General Information</h4>
				<p>
					<label>Name </label>
					<form:input path="name" cssClass="uiTextbox"/>
				</p>
				<p>
					<label>Ear Tag </label>
					<form:input path="earTag" cssClass="uiTextbox"/>
				</p>
				<p>
					<label>Type</label>
					<form:select path="type" itemLabel="name" items="${type }" cssClass="uiDropdown"/>
				</p>
				<p>
					<label>Birth Weight </label>
					<form:input path="birthWeight" cssClass="uiTextbox"></form:input>
				</p>
				<p>
					<label>Weight </label>
					<form:input path="weight" cssClass="uiTextbox"></form:input>
				</p>
				<p>
					<label>Health Status</label>
					<form:select path="healthStatus" itemLabel="name" items="${healthStatus }"/>
				</p>
				<p>
					<label>Date of Birth</label>
					<form:input path="dateOfBirth" cssClass="uiDateTextbox"/>
				</p>
				<p>
					<label>Colour</label>
					<form:select path="colour" itemLabel="name" items="${color }"/>
				</p>
			
				<p>
					<label class="uiLabel">Picture:</label>
					<input type="file" name="file" />
				</p>
				<p>
					<label>Breed </label>
					<form:select path="breed" itemLabel="name" items="${breed }"/>
				</p>
				
			</div>
		</div>
		<div class="splitcontentright">
			<div class="box tabular">
				<h4>General Information</h4>
				<p>
					<label>Purchase Date </label>
					<form:input path="purchaseDate" cssClass="uiDateTextbox"/>
				</p>
				<p>
					<label>Selling Price</label>
					<form:input path="sellingPrice" cssClass="uiTextbox"></form:input>
				</p>
				<p>
					<label>Buying Price </label>
					<form:input path="buyingPrice" cssClass="uiTextbox"></form:input>
				</p>
				<p>
					<label>Status </label>
					<form:select path="status" itemLabel="name" items="${status }"/>
				</p>
			</div>
		</div>
		<div class="splitcontentright">
			<div class="box tabular">
				<h3>Description</h3>
				<p>
					<label>Description </label>
					<form:textarea path="description" cssClass="uiTextarea"></form:textarea>
				</p>
			</div>
		</div>
		<div style="clear: both"></div>
		<div>
			<input id="btnSaveAnimal" type="submit" value="Save" class="uiButton" /> 
			<input id="btnCancelAnimal" type="button" value="Cancel" class="uiButton"/> 
		</div>
	</form:form>
</div>